package com.qlw.bean;

import com.qlw.bean.Menu;

public class Menu {
	
	private Integer id;//�˵���
	
	private String mname;//�˵���
	
	private Float mprice;//�˵���
	
	public Menu(){

	}

    public Menu(Integer id,String mname,Float mprice){
		this.id =id;
		this.mname = mname;
		this.mprice =mprice;
		
	}
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getMname() {
		return mname;
	}

	public void setMname(String mname) {
		this.mname = mname;
	}

	public float getMprice() {
		return mprice;
	}

	public void setMprice(Float mprice) {
		this.mprice = mprice;
	}

	
	
	
	public int hashCode() {
		// TODO Auto-generated method stub
		return this.getId()+this.getMname().hashCode();
	}

	@Override
	public boolean equals(Object obj) {
		// TODO Auto-generated method stub
		if(this==obj)
		{
			return true;
		}
		if(obj instanceof Menu)
		{
			Menu i = (Menu)obj;
			if(this.getId()==i.getId()&&this.getMname().equals(i.getMname()))
			{
				return true;
			}
			else
			{
				return false;
			}
		}
		else
		{
			return false;
		}
	}

	public String toString()
	{
		return "��Ʒ��ţ�"+this.getId()+",��Ʒ��ƣ�"+this.getMname();
	}

}



